<div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
        <legend>series序列操作</legend>
    </fieldset>
    <div class="site-demo-button" style="margin-bottom: 0;">
        <button class="layui-btn site-demo-active-new">新增序列</button>
        <button class="layui-btn site-demo-active-save">保存序列</button>
    </div>
    <div class="layui-tab layui-tab-card" lay-filter="demo" lay-allowclose="true">
        <ul class="layui-tab-title"></ul>
        <div class="layui-tab-content"></div>
    </div>
    <script type="text/javascript" src="../.././static/js/public-head.js"></script>
    <script>
        layui.use('element', function(){
            var $ = layui.jquery,element = layui.element;
            var id  = 0;
            $('.site-demo-active-new').on('click', function(){
                element.tabAdd('demo', {
                    title: '序列'
                    ,content: '<iframe src="echartsLineSeriesSingle.html" frameborder="0" width="100%" height="50%"></iframe>'
                    ,id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                })
            });
            $('.site-demo-active-save').on('click', function(){
                var childrens = $($('.layui-tab-content')[0]).children();
                for(var i=0;i<childrens.length;i++){
                    var iframe = $(($(childrens[i]).children("iframe"))[0]);
                    iframe.find("#echart-line-form-bt");
                }
            });
        });
    </script>
</div>
